package com.hzdl.hotel.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hzdl.hotel.bean.Customer;
import com.hzdl.hotel.bean.GuestRoom;
import com.hzdl.hotel.bean.User;
import com.hzdl.hotel.mapper.CustomerMapper;
import com.hzdl.hotel.service.CustomerService;
import com.hzdl.hotel.vo.CustomerVo;
import com.hzdl.hotel.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private CustomerMapper cm;
    @Override
    public PageInfo findUserByWhere(CustomerVo customerVo) {
        PageHelper.startPage(customerVo.getPage(),customerVo.getLimit());
        List<Customer> gList = cm.findUserByWhere(customerVo);
        PageInfo pageInfo = new PageInfo(gList);
        return pageInfo;
    }

    @Override
    public List<Customer> findUserByWhere1(CustomerVo customerVo) {
        return cm.findUserByWhere(customerVo);
    }
}
